<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    ul, li {
      list-style: none;
    }
    .nav {
      width: 600px;
      margin: 50px auto;
    }
    li {
      position: relative;
      float: left;
      width: 100px;
      height: 40px;
      margin: 0 10px;
      line-height: 40px;
      text-align: center;
      box-sizing: border-box;
      perspective: 500px;
    }
    .box {
      transform-style: preserve-3d;
      width: 100px;
      height: 40px;
      transition: all .5s;
    }
    .front,
    .bottom {
      position: absolute;
      width: 100%;
      height: 100%;
    }
    .front {
      background-color: #acf;
      transform: translateZ(20px);
    }
    .bottom {
      background-color: #13f;
      transform: translateY(20px) rotateX(-90deg);
    }
    .box:hover {
      transform: rotateX(90deg);
    }
  </style>
</head>
<body>
  <div class="nav">
    <ul>
      <li>
        <div class="box">
          <div class="front">0123</div>
          <div class="bottom">0123</div>
        </div>
      </li>
      <li>
        <div class="box">
          <div class="front">0123</div>
          <div class="bottom">0123</div>
        </div>
      </li>
      <li>
        <div class="box">
          <div class="front">0123</div>
          <div class="bottom">0123</div>
        </div>
      </li>
      <li>
        <div class="box">
          <div class="front">0123</div>
          <div class="bottom">0123</div>
        </div>
      </li>
      <li>
        <div class="box">
          <div class="front">0123</div>
          <div class="bottom">0123</div>
        </div>
      </li>
    </ul>
  </div>
</body>
</html>